Optimal. Leaf size=135 \[ \frac {2 a (A+B) \sin (c+d x) \sqrt {\sec (c+d x)}}{d}+\frac {2 a (A+3 B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 d}-\frac {2 a (A+B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 a A \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.19, antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {2960, 3997, 3787, 3771, 2641, 3768, 2639} \[ \frac {2 a (A+B) \sin (c+d x) \sqrt {\sec (c+d x)}}{d}+\frac {2 a (A+3 B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 d}-\frac {2 a (A+B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 a A \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2639
Rule 2641
Rule 2960
Rule 3768
Rule 3771
Rule 3787
Rule 3997
Rubi steps
\begin {align*} \int (a+a \cos (c+d x)) (A+B \cos (c+d x)) \sec ^{\frac {5}{2}}(c+d x) \, dx &=\int \sqrt {\sec (c+d x)} (a+a \sec (c+d x)) (B+A \sec (c+d x)) \, dx\\ &=\frac {2 a A \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}+\frac {2}{3} \int \sqrt {\sec (c+d x)} \left (\frac {1}{2} a (A+3 B)+\frac {3}{2} a (A+B) \sec (c+d x)\right ) \, dx\\ &=\frac {2 a A \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}+(a (A+B)) \int \sec ^{\frac {3}{2}}(c+d x) \, dx+\frac {1}{3} (a (A+3 B)) \int \sqrt {\sec (c+d x)} \, dx\\ &=\frac {2 a (A+B) \sqrt {\sec (c+d x)} \sin (c+d x)}{d}+\frac {2 a A \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}-(a (A+B)) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx+\frac {1}{3} \left (a (A+3 B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=\frac {2 a (A+3 B) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {2 a (A+B) \sqrt {\sec (c+d x)} \sin (c+d x)}{d}+\frac {2 a A \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}-\left (a (A+B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx\\ &=-\frac {2 a (A+B) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{d}+\frac {2 a (A+3 B) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {2 a (A+B) \sqrt {\sec (c+d x)} \sin (c+d x)}{d}+\frac {2 a A \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 1.23, size = 225, normalized size = 1.67 \[ \frac {a (\cos (c+d x)+1) \sec ^2\left (\frac {1}{2} (c+d x)\right ) \sqrt {\sec (c+d x)} \left (i \left ((A+B) e^{i (c+d x)} \left (1+e^{2 i (c+d x)}\right )^{3/2} \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};-e^{2 i (c+d x)}\right )-3 A e^{i (c+d x)}-A e^{2 i (c+d x)}-3 A e^{3 i (c+d x)}+A-3 B e^{i (c+d x)}-3 B e^{3 i (c+d x)}\right )+(A+3 B) \left (1+e^{2 i (c+d x)}\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )\right )}{3 d \left (1+e^{2 i (c+d x)}\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.85, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (B a \cos \left (d x + c\right )^{2} + {\left (A + B\right )} a \cos \left (d x + c\right ) + A a\right )} \sec \left (d x + c\right )^{\frac {5}{2}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (B \cos \left (d x + c\right ) + A\right )} {\left (a \cos \left (d x + c\right ) + a\right )} \sec \left (d x + c\right )^{\frac {5}{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 3.57, size = 426, normalized size = 3.16 \[ -\frac {4 \sqrt {-\left (-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, a \left (\frac {B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{2 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}+\frac {\left (\frac {A}{2}+\frac {B}{2}\right ) \left (-\sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+2 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right )}+\frac {A \left (-\frac {\cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}{6 \left (-\frac {1}{2}+\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{3 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}}\right )}{2}\right )}{\sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (B \cos \left (d x + c\right ) + A\right )} {\left (a \cos \left (d x + c\right ) + a\right )} \sec \left (d x + c\right )^{\frac {5}{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \left (A+B\,\cos \left (c+d\,x\right )\right )\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{5/2}\,\left (a+a\,\cos \left (c+d\,x\right )\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________